import { PokerConfig } from "./PokerConfig";

export namespace TextureConfig {

    export class Texture {
        constructor(public readonly dir: string, public readonly texture: string, public readonly frame: number) { }

        get path() {
            return this.dir + '/' + this.texture
        }
    }


    export class PokerTexture extends Texture {
        constructor(public readonly PokerLarge: PokerConfig.EnumPoker, dir: string, texture = 'cards_large_tilemap', frame = 0) {
            super(dir, texture, frame)
        }
    }

    export class PokerLarge extends PokerTexture {
        constructor(PokerLarge: PokerConfig.EnumPoker, texture: string, frame: number = 0) {
            super(PokerLarge, 'image/card_large', texture, frame)
        }
    }

    export class PokerMedium extends PokerTexture {
        constructor(PokerLarge: PokerConfig.EnumPoker, texture: string, frame: number = 0) {
            super(PokerLarge, 'image/card_medium', texture, frame)
        }
    }

    export class PokerSmall extends PokerTexture {
        constructor(PokerLarge: PokerConfig.EnumPoker, texture: string, frame: number = 0) {
            super(PokerLarge, 'image/card_small', texture, frame)
        }
    }

    export const Poker_H_A = new PokerLarge(PokerConfig.H_A, 'card_hearts_A');
    export const Poker_H_2 = new PokerLarge(PokerConfig.H_2, 'card_hearts_02');
    export const Poker_H_3 = new PokerLarge(PokerConfig.H_3, 'card_hearts_03');
    export const Poker_H_4 = new PokerLarge(PokerConfig.H_4, 'card_hearts_04');
    export const Poker_H_5 = new PokerLarge(PokerConfig.H_5, 'card_hearts_05');
    export const Poker_H_6 = new PokerLarge(PokerConfig.H_6, 'card_hearts_06');
    export const Poker_H_7 = new PokerLarge(PokerConfig.H_7, 'card_hearts_07');
    export const Poker_H_8 = new PokerLarge(PokerConfig.H_8, 'card_hearts_08');
    export const Poker_H_9 = new PokerLarge(PokerConfig.H_9, 'card_hearts_09');
    export const Poker_H10 = new PokerLarge(PokerConfig.H10, 'card_hearts_10');
    export const Poker_H_J = new PokerLarge(PokerConfig.H_J, 'card_hearts_J');
    export const Poker_H_Q = new PokerLarge(PokerConfig.H_Q, 'card_hearts_Q');
    export const Poker_H_K = new PokerLarge(PokerConfig.H_K, 'card_hearts_K');

    export const Poker_F_A = new PokerLarge(PokerConfig.F_A, 'card_diamonds_A');
    export const Poker_F_2 = new PokerLarge(PokerConfig.F_2, 'card_diamonds_02');
    export const Poker_F_3 = new PokerLarge(PokerConfig.F_3, 'card_diamonds_03');
    export const Poker_F_4 = new PokerLarge(PokerConfig.F_4, 'card_diamonds_04');
    export const Poker_F_5 = new PokerLarge(PokerConfig.F_5, 'card_diamonds_05');
    export const Poker_F_6 = new PokerLarge(PokerConfig.F_6, 'card_diamonds_06');
    export const Poker_F_7 = new PokerLarge(PokerConfig.F_7, 'card_diamonds_07');
    export const Poker_F_8 = new PokerLarge(PokerConfig.F_8, 'card_diamonds_08');
    export const Poker_F_9 = new PokerLarge(PokerConfig.F_9, 'card_diamonds_09');
    export const Poker_F10 = new PokerLarge(PokerConfig.F10, 'card_diamonds_10');
    export const Poker_F_J = new PokerLarge(PokerConfig.F_J, 'card_diamonds_J');
    export const Poker_F_Q = new PokerLarge(PokerConfig.F_Q, 'card_diamonds_Q');
    export const Poker_F_K = new PokerLarge(PokerConfig.F_K, 'card_diamonds_K');

    export const Poker_M_A = new PokerLarge(PokerConfig.M_A, 'card_clubs_A');
    export const Poker_M_2 = new PokerLarge(PokerConfig.M_2, 'card_clubs_02');
    export const Poker_M_3 = new PokerLarge(PokerConfig.M_3, 'card_clubs_03');
    export const Poker_M_4 = new PokerLarge(PokerConfig.M_4, 'card_clubs_04');
    export const Poker_M_5 = new PokerLarge(PokerConfig.M_5, 'card_clubs_05');
    export const Poker_M_6 = new PokerLarge(PokerConfig.M_6, 'card_clubs_06');
    export const Poker_M_7 = new PokerLarge(PokerConfig.M_7, 'card_clubs_07');
    export const Poker_M_8 = new PokerLarge(PokerConfig.M_8, 'card_clubs_08');
    export const Poker_M_9 = new PokerLarge(PokerConfig.M_9, 'card_clubs_09');
    export const Poker_M10 = new PokerLarge(PokerConfig.M10, 'card_clubs_10');
    export const Poker_M_J = new PokerLarge(PokerConfig.M_J, 'card_clubs_J');
    export const Poker_M_Q = new PokerLarge(PokerConfig.M_Q, 'card_clubs_Q');
    export const Poker_M_K = new PokerLarge(PokerConfig.M_K, 'card_clubs_K');

    export const Poker_B_A = new PokerLarge(PokerConfig.B_A, 'card_spades_A');
    export const Poker_B_2 = new PokerLarge(PokerConfig.B_2, 'card_spades_02');
    export const Poker_B_3 = new PokerLarge(PokerConfig.B_3, 'card_spades_03');
    export const Poker_B_4 = new PokerLarge(PokerConfig.B_4, 'card_spades_04');
    export const Poker_B_5 = new PokerLarge(PokerConfig.B_5, 'card_spades_05');
    export const Poker_B_6 = new PokerLarge(PokerConfig.B_6, 'card_spades_06');
    export const Poker_B_7 = new PokerLarge(PokerConfig.B_7, 'card_spades_07');
    export const Poker_B_8 = new PokerLarge(PokerConfig.B_8, 'card_spades_08');
    export const Poker_B_9 = new PokerLarge(PokerConfig.B_9, 'card_spades_09');
    export const Poker_B10 = new PokerLarge(PokerConfig.B10, 'card_spades_10');
    export const Poker_B_J = new PokerLarge(PokerConfig.B_J, 'card_spades_J');
    export const Poker_B_Q = new PokerLarge(PokerConfig.B_Q, 'card_spades_Q');
    export const Poker_B_K = new PokerLarge(PokerConfig.B_K, 'card_spades_K');

    export const Poker_J_B = new PokerLarge(PokerConfig.J_B, 'card_joker_red');
    export const Poker_J_S = new PokerLarge(PokerConfig.J_S, 'card_joker_black');

    export const Poker_Empty = new Texture('image/card_large', 'card_empty', 0);
    export const Poker_Back = new Texture('image/card_large', 'card_back', 0);

    // Medium
    export const Poker_H_A_Medium = new PokerMedium(PokerConfig.H_A, 'card_hearts_A');
    export const Poker_H_2_Medium = new PokerMedium(PokerConfig.H_2, 'card_hearts_02');
    export const Poker_H_3_Medium = new PokerMedium(PokerConfig.H_3, 'card_hearts_03');
    export const Poker_H_4_Medium = new PokerMedium(PokerConfig.H_4, 'card_hearts_04');
    export const Poker_H_5_Medium = new PokerMedium(PokerConfig.H_5, 'card_hearts_05');
    export const Poker_H_6_Medium = new PokerMedium(PokerConfig.H_6, 'card_hearts_06');
    export const Poker_H_7_Medium = new PokerMedium(PokerConfig.H_7, 'card_hearts_07');
    export const Poker_H_8_Medium = new PokerMedium(PokerConfig.H_8, 'card_hearts_08');
    export const Poker_H_9_Medium = new PokerMedium(PokerConfig.H_9, 'card_hearts_09');
    export const Poker_H10_Medium = new PokerMedium(PokerConfig.H10, 'card_hearts_10');
    export const Poker_H_J_Medium = new PokerMedium(PokerConfig.H_J, 'card_hearts_J');
    export const Poker_H_Q_Medium = new PokerMedium(PokerConfig.H_Q, 'card_hearts_Q');
    export const Poker_H_K_Medium = new PokerMedium(PokerConfig.H_K, 'card_hearts_K');


    export const Poker_F_A_Medium = new PokerMedium(PokerConfig.F_A, 'card_diamonds_A');
    export const Poker_F_2_Medium = new PokerMedium(PokerConfig.F_2, 'card_diamonds_02');
    export const Poker_F_3_Medium = new PokerMedium(PokerConfig.F_3, 'card_diamonds_03');
    export const Poker_F_4_Medium = new PokerMedium(PokerConfig.F_4, 'card_diamonds_04');
    export const Poker_F_5_Medium = new PokerMedium(PokerConfig.F_5, 'card_diamonds_05');
    export const Poker_F_6_Medium = new PokerMedium(PokerConfig.F_6, 'card_diamonds_06');
    export const Poker_F_7_Medium = new PokerMedium(PokerConfig.F_7, 'card_diamonds_07');
    export const Poker_F_8_Medium = new PokerMedium(PokerConfig.F_8, 'card_diamonds_08');
    export const Poker_F_9_Medium = new PokerMedium(PokerConfig.F_9, 'card_diamonds_09');
    export const Poker_F10_Medium = new PokerMedium(PokerConfig.F10, 'card_diamonds_10');
    export const Poker_F_J_Medium = new PokerMedium(PokerConfig.F_J, 'card_diamonds_J');
    export const Poker_F_Q_Medium = new PokerMedium(PokerConfig.F_Q, 'card_diamonds_Q');
    export const Poker_F_K_Medium = new PokerMedium(PokerConfig.F_K, 'card_diamonds_K');


    export const Poker_M_A_Medium = new PokerMedium(PokerConfig.M_A, 'card_clubs_A');
    export const Poker_M_2_Medium = new PokerMedium(PokerConfig.M_2, 'card_clubs_02');
    export const Poker_M_3_Medium = new PokerMedium(PokerConfig.M_3, 'card_clubs_03');
    export const Poker_M_4_Medium = new PokerMedium(PokerConfig.M_4, 'card_clubs_04');
    export const Poker_M_5_Medium = new PokerMedium(PokerConfig.M_5, 'card_clubs_05');
    export const Poker_M_6_Medium = new PokerMedium(PokerConfig.M_6, 'card_clubs_06');
    export const Poker_M_7_Medium = new PokerMedium(PokerConfig.M_7, 'card_clubs_07');
    export const Poker_M_8_Medium = new PokerMedium(PokerConfig.M_8, 'card_clubs_08');
    export const Poker_M_9_Medium = new PokerMedium(PokerConfig.M_9, 'card_clubs_09');
    export const Poker_M10_Medium = new PokerMedium(PokerConfig.M10, 'card_clubs_10');
    export const Poker_M_J_Medium = new PokerMedium(PokerConfig.M_J, 'card_clubs_J');
    export const Poker_M_Q_Medium = new PokerMedium(PokerConfig.M_Q, 'card_clubs_Q');
    export const Poker_M_K_Medium = new PokerMedium(PokerConfig.M_K, 'card_clubs_K');


    export const Poker_B_A_Medium = new PokerMedium(PokerConfig.B_A, 'card_spades_A');
    export const Poker_B_2_Medium = new PokerMedium(PokerConfig.B_2, 'card_spades_02');
    export const Poker_B_3_Medium = new PokerMedium(PokerConfig.B_3, 'card_spades_03');
    export const Poker_B_4_Medium = new PokerMedium(PokerConfig.B_4, 'card_spades_04');
    export const Poker_B_5_Medium = new PokerMedium(PokerConfig.B_5, 'card_spades_05');
    export const Poker_B_6_Medium = new PokerMedium(PokerConfig.B_6, 'card_spades_06');
    export const Poker_B_7_Medium = new PokerMedium(PokerConfig.B_7, 'card_spades_07');
    export const Poker_B_8_Medium = new PokerMedium(PokerConfig.B_8, 'card_spades_08');
    export const Poker_B_9_Medium = new PokerMedium(PokerConfig.B_9, 'card_spades_09');
    export const Poker_B10_Medium = new PokerMedium(PokerConfig.B10, 'card_spades_10');
    export const Poker_B_J_Medium = new PokerMedium(PokerConfig.B_J, 'card_spades_J');
    export const Poker_B_Q_Medium = new PokerMedium(PokerConfig.B_Q, 'card_spades_Q');
    export const Poker_B_K_Medium = new PokerMedium(PokerConfig.B_K, 'card_spades_K');

    export const Poker_J_B_Medium = new PokerMedium(PokerConfig.J_B, 'card_joker_red');
    export const Poker_J_S_Medium = new PokerMedium(PokerConfig.J_S, 'card_joker_black');

    export const Poker_H_Medium = new Texture('image/card_medium', 'card_hearts_suit', 0);
    export const Poker_F_Medium = new Texture('image/card_medium', 'card_diamonds_suit', 0);
    export const Poker_M_Medium = new Texture('image/card_medium', 'card_clubs_suit', 0);
    export const Poker_B_Medium = new Texture('image/card_medium', 'card_spades_suit', 0);

    export const Poker_Empty_Medium = new Texture('image/card_medium', 'card_empty', 0);
    export const Poker_Back_Medium = new Texture('image/card_medium', 'card_back', 0);

    // Small
    export const Poker_H_A_Small = new PokerSmall(PokerConfig.H_A, 'card_hearts_A');
    export const Poker_H_2_Small = new PokerSmall(PokerConfig.H_2, 'card_hearts_02');
    export const Poker_H_3_Small = new PokerSmall(PokerConfig.H_3, 'card_hearts_03');
    export const Poker_H_4_Small = new PokerSmall(PokerConfig.H_4, 'card_hearts_04');
    export const Poker_H_5_Small = new PokerSmall(PokerConfig.H_5, 'card_hearts_05');
    export const Poker_H_6_Small = new PokerSmall(PokerConfig.H_6, 'card_hearts_06');
    export const Poker_H_7_Small = new PokerSmall(PokerConfig.H_7, 'card_hearts_07');
    export const Poker_H_8_Small = new PokerSmall(PokerConfig.H_8, 'card_hearts_08');
    export const Poker_H_9_Small = new PokerSmall(PokerConfig.H_9, 'card_hearts_09');
    export const Poker_H10_Small = new PokerSmall(PokerConfig.H10, 'card_hearts_10');
    export const Poker_H_J_Small = new PokerSmall(PokerConfig.H_J, 'card_hearts_J');
    export const Poker_H_Q_Small = new PokerSmall(PokerConfig.H_Q, 'card_hearts_Q');
    export const Poker_H_K_Small = new PokerSmall(PokerConfig.H_K, 'card_hearts_K');

    export const Poker_H_Small = new Texture('image/card_small', 'card_hearts_suit', 0);
    export const Poker_H_Trans = new Texture('image/card_small', 'other_suit_hearts', 0);

    export const Poker_F_A_Small = new PokerSmall(PokerConfig.F_A, 'card_diamonds_A');
    export const Poker_F_2_Small = new PokerSmall(PokerConfig.F_2, 'card_diamonds_02');
    export const Poker_F_3_Small = new PokerSmall(PokerConfig.F_3, 'card_diamonds_03');
    export const Poker_F_4_Small = new PokerSmall(PokerConfig.F_4, 'card_diamonds_04');
    export const Poker_F_5_Small = new PokerSmall(PokerConfig.F_5, 'card_diamonds_05');
    export const Poker_F_6_Small = new PokerSmall(PokerConfig.F_6, 'card_diamonds_06');
    export const Poker_F_7_Small = new PokerSmall(PokerConfig.F_7, 'card_diamonds_07');
    export const Poker_F_8_Small = new PokerSmall(PokerConfig.F_8, 'card_diamonds_08');
    export const Poker_F_9_Small = new PokerSmall(PokerConfig.F_9, 'card_diamonds_09');
    export const Poker_F10_Small = new PokerSmall(PokerConfig.F10, 'card_diamonds_10');
    export const Poker_F_J_Small = new PokerSmall(PokerConfig.F_J, 'card_diamonds_J');
    export const Poker_F_Q_Small = new PokerSmall(PokerConfig.F_Q, 'card_diamonds_Q');
    export const Poker_F_K_Small = new PokerSmall(PokerConfig.F_K, 'card_diamonds_K');

    export const Poker_F_Small = new Texture('image/card_small', 'card_diamonds_suit', 0);
    export const Poker_F_Trans = new Texture('image/card_small', 'other_suit_diamonds', 0);

    export const Poker_M_A_Small = new PokerSmall(PokerConfig.M_A, 'card_clubs_A');
    export const Poker_M_2_Small = new PokerSmall(PokerConfig.M_2, 'card_clubs_02');
    export const Poker_M_3_Small = new PokerSmall(PokerConfig.M_3, 'card_clubs_03');
    export const Poker_M_4_Small = new PokerSmall(PokerConfig.M_4, 'card_clubs_04');
    export const Poker_M_5_Small = new PokerSmall(PokerConfig.M_5, 'card_clubs_05');
    export const Poker_M_6_Small = new PokerSmall(PokerConfig.M_6, 'card_clubs_06');
    export const Poker_M_7_Small = new PokerSmall(PokerConfig.M_7, 'card_clubs_07');
    export const Poker_M_8_Small = new PokerSmall(PokerConfig.M_8, 'card_clubs_08');
    export const Poker_M_9_Small = new PokerSmall(PokerConfig.M_9, 'card_clubs_09');
    export const Poker_M10_Small = new PokerSmall(PokerConfig.M10, 'card_clubs_10');
    export const Poker_M_J_Small = new PokerSmall(PokerConfig.M_J, 'card_clubs_J');
    export const Poker_M_Q_Small = new PokerSmall(PokerConfig.M_Q, 'card_clubs_Q');
    export const Poker_M_K_Small = new PokerSmall(PokerConfig.M_K, 'card_clubs_K');

    export const Poker_M_Small = new Texture('image/card_small', 'card_spades_suit', 0);
    export const Poker_M_Trans = new Texture('image/card_small', 'other_suit_clubs', 0);

    export const Poker_B_A_Small = new PokerSmall(PokerConfig.B_A, 'card_spades_A');
    export const Poker_B_2_Small = new PokerSmall(PokerConfig.B_2, 'card_spades_02');
    export const Poker_B_3_Small = new PokerSmall(PokerConfig.B_3, 'card_spades_03');
    export const Poker_B_4_Small = new PokerSmall(PokerConfig.B_4, 'card_spades_04');
    export const Poker_B_5_Small = new PokerSmall(PokerConfig.B_5, 'card_spades_05');
    export const Poker_B_6_Small = new PokerSmall(PokerConfig.B_6, 'card_spades_06');
    export const Poker_B_7_Small = new PokerSmall(PokerConfig.B_7, 'card_spades_07');
    export const Poker_B_8_Small = new PokerSmall(PokerConfig.B_8, 'card_spades_08');
    export const Poker_B_9_Small = new PokerSmall(PokerConfig.B_9, 'card_spades_09');
    export const Poker_B10_Small = new PokerSmall(PokerConfig.B10, 'card_spades_10');
    export const Poker_B_J_Small = new PokerSmall(PokerConfig.B_J, 'card_spades_J');
    export const Poker_B_Q_Small = new PokerSmall(PokerConfig.B_Q, 'card_spades_Q');
    export const Poker_B_K_Small = new PokerSmall(PokerConfig.B_K, 'card_spades_K');

    export const Poker_B_Small = new Texture('image/card_small', 'card_spades_suit', 0);
    export const Poker_B_Trans = new Texture('image/card_small', 'other_suit_spades', 0);

    
    export const Poker_Small_Color_Red = new Texture('image/card_small', 'card_color_red', 0);
    export const Poker_Small_Color_Black = new Texture('image/card_small', 'card_color_black', 0);

    
    export const Poker_Small_Link_Color_Red = new Texture('image/card_small', 'card_link_red', 0);
    export const Poker_Small_Link_Color_Black = new Texture('image/card_small', 'card_link_black', 0);
    export const Poker_Small_Link_Color_Cross = new Texture('image/card_small', 'card_link', 0);

    export const pokerArray = [
        Poker_H_A,
        Poker_H_2,
        Poker_H_3,
        Poker_H_4,
        Poker_H_5,
        Poker_H_6,
        Poker_H_7,
        Poker_H_8,
        Poker_H_9,
        Poker_H10,
        Poker_H_J,
        Poker_H_Q,
        Poker_H_K,

        Poker_F_A,
        Poker_F_2,
        Poker_F_3,
        Poker_F_4,
        Poker_F_5,
        Poker_F_6,
        Poker_F_7,
        Poker_F_8,
        Poker_F_9,
        Poker_F10,
        Poker_F_J,
        Poker_F_Q,
        Poker_F_K,

        Poker_M_A,
        Poker_M_2,
        Poker_M_3,
        Poker_M_4,
        Poker_M_5,
        Poker_M_6,
        Poker_M_7,
        Poker_M_8,
        Poker_M_9,
        Poker_M10,
        Poker_M_J,
        Poker_M_Q,
        Poker_M_K,

        Poker_B_A,
        Poker_B_2,
        Poker_B_3,
        Poker_B_4,
        Poker_B_5,
        Poker_B_6,
        Poker_B_7,
        Poker_B_8,
        Poker_B_9,
        Poker_B10,
        Poker_B_J,
        Poker_B_Q,
        Poker_B_K,

        Poker_J_B,
        Poker_J_S,
    ]
    export const pokerArraySmall = [
        Poker_H_A_Small,
        Poker_H_2_Small,
        Poker_H_3_Small,
        Poker_H_4_Small,
        Poker_H_5_Small,
        Poker_H_6_Small,
        Poker_H_7_Small,
        Poker_H_8_Small,
        Poker_H_9_Small,
        Poker_H10_Small,
        Poker_H_J_Small,
        Poker_H_Q_Small,
        Poker_H_K_Small,

        Poker_F_A_Small,
        Poker_F_2_Small,
        Poker_F_3_Small,
        Poker_F_4_Small,
        Poker_F_5_Small,
        Poker_F_6_Small,
        Poker_F_7_Small,
        Poker_F_8_Small,
        Poker_F_9_Small,
        Poker_F10_Small,
        Poker_F_J_Small,
        Poker_F_Q_Small,
        Poker_F_K_Small,

        Poker_M_A_Small,
        Poker_M_2_Small,
        Poker_M_3_Small,
        Poker_M_4_Small,
        Poker_M_5_Small,
        Poker_M_6_Small,
        Poker_M_7_Small,
        Poker_M_8_Small,
        Poker_M_9_Small,
        Poker_M10_Small,
        Poker_M_J_Small,
        Poker_M_Q_Small,
        Poker_M_K_Small,

        Poker_B_A_Small,
        Poker_B_2_Small,
        Poker_B_3_Small,
        Poker_B_4_Small,
        Poker_B_5_Small,
        Poker_B_6_Small,
        Poker_B_7_Small,
        Poker_B_8_Small,
        Poker_B_9_Small,
        Poker_B10_Small,
        Poker_B_J_Small,
        Poker_B_Q_Small,
        Poker_B_K_Small,
    ]
    export const pokerArrayMedium = [
        Poker_H_A_Medium,
        Poker_H_2_Medium,
        Poker_H_3_Medium,
        Poker_H_4_Medium,
        Poker_H_5_Medium,
        Poker_H_6_Medium,
        Poker_H_7_Medium,
        Poker_H_8_Medium,
        Poker_H_9_Medium,
        Poker_H10_Medium,
        Poker_H_J_Medium,
        Poker_H_Q_Medium,
        Poker_H_K_Medium,

        Poker_F_A_Medium,
        Poker_F_2_Medium,
        Poker_F_3_Medium,
        Poker_F_4_Medium,
        Poker_F_5_Medium,
        Poker_F_6_Medium,
        Poker_F_7_Medium,
        Poker_F_8_Medium,
        Poker_F_9_Medium,
        Poker_F10_Medium,
        Poker_F_J_Medium,
        Poker_F_Q_Medium,
        Poker_F_K_Medium,

        Poker_M_A_Medium,
        Poker_M_2_Medium,
        Poker_M_3_Medium,
        Poker_M_4_Medium,
        Poker_M_5_Medium,
        Poker_M_6_Medium,
        Poker_M_7_Medium,
        Poker_M_8_Medium,
        Poker_M_9_Medium,
        Poker_M10_Medium,
        Poker_M_J_Medium,
        Poker_M_Q_Medium,
        Poker_M_K_Medium,

        Poker_B_A_Medium,
        Poker_B_2_Medium,
        Poker_B_3_Medium,
        Poker_B_4_Medium,
        Poker_B_5_Medium,
        Poker_B_6_Medium,
        Poker_B_7_Medium,
        Poker_B_8_Medium,
        Poker_B_9_Medium,
        Poker_B10_Medium,
        Poker_B_J_Medium,
        Poker_B_Q_Medium,
        Poker_B_K_Medium,
    ]

    export const textureArray = [
        // ...pokerArray,
        // Poker_Empty,
        // Poker_Unknown,

        // ...pokerArraySmall,
        // Poker_H_Small,
        // Poker_H_Trans,
        // Poker_F_Small,
        // Poker_F_Trans,
        // Poker_M_Small,
        // Poker_M_Trans,
        // Poker_B_Small,
        // Poker_B_Trans,

        // ...diceArray,
        // Dice_Empty,
        // Dice_Unknown,

        // ...diceArrayDark,
        // Dice_Empty_Dark,
        // Dice_Unknown_Dark,

        // ...pokerArrayMedium,
        Poker_J_B_Medium,
        Poker_J_S_Medium,
        Poker_H_Medium,
        Poker_F_Medium,
        Poker_M_Medium,
        Poker_B_Medium,
        Poker_Empty_Medium,
        Poker_Back_Medium,
    ]

    export const getTexture = (type: PokerConfig.EnumPoker) => {
        switch (type) {
            // 红桃 H
            case PokerConfig.H_A: return Poker_H_A;
            case PokerConfig.H_2: return Poker_H_2;
            case PokerConfig.H_3: return Poker_H_3;
            case PokerConfig.H_4: return Poker_H_4;
            case PokerConfig.H_5: return Poker_H_5;
            case PokerConfig.H_6: return Poker_H_6;
            case PokerConfig.H_7: return Poker_H_7;
            case PokerConfig.H_8: return Poker_H_8;
            case PokerConfig.H_9: return Poker_H_9;
            case PokerConfig.H10: return Poker_H10;
            case PokerConfig.H_J: return Poker_H_J;
            case PokerConfig.H_Q: return Poker_H_Q;
            case PokerConfig.H_K: return Poker_H_K;
            // 方片 F
            case PokerConfig.F_A: return Poker_F_A;
            case PokerConfig.F_2: return Poker_F_2;
            case PokerConfig.F_3: return Poker_F_3;
            case PokerConfig.F_4: return Poker_F_4;
            case PokerConfig.F_5: return Poker_F_5;
            case PokerConfig.F_6: return Poker_F_6;
            case PokerConfig.F_7: return Poker_F_7;
            case PokerConfig.F_8: return Poker_F_8;
            case PokerConfig.F_9: return Poker_F_9;
            case PokerConfig.F10: return Poker_F10;
            case PokerConfig.F_J: return Poker_F_J;
            case PokerConfig.F_Q: return Poker_F_Q;
            case PokerConfig.F_K: return Poker_F_K;

            // 梅花 M
            case PokerConfig.M_A: return Poker_M_A;
            case PokerConfig.M_2: return Poker_M_2;
            case PokerConfig.M_3: return Poker_M_3;
            case PokerConfig.M_4: return Poker_M_4;
            case PokerConfig.M_5: return Poker_M_5;
            case PokerConfig.M_6: return Poker_M_6;
            case PokerConfig.M_7: return Poker_M_7;
            case PokerConfig.M_8: return Poker_M_8;
            case PokerConfig.M_9: return Poker_M_9;
            case PokerConfig.M10: return Poker_M10;
            case PokerConfig.M_J: return Poker_M_J;
            case PokerConfig.M_Q: return Poker_M_Q;
            case PokerConfig.M_K: return Poker_M_K;

            // 黑桃 Black
            case PokerConfig.B_A: return Poker_B_A;
            case PokerConfig.B_2: return Poker_B_2;
            case PokerConfig.B_3: return Poker_B_3;
            case PokerConfig.B_4: return Poker_B_4;
            case PokerConfig.B_5: return Poker_B_5;
            case PokerConfig.B_6: return Poker_B_6;
            case PokerConfig.B_7: return Poker_B_7;
            case PokerConfig.B_8: return Poker_B_8;
            case PokerConfig.B_9: return Poker_B_9;
            case PokerConfig.B10: return Poker_B10;
            case PokerConfig.B_J: return Poker_B_J;
            case PokerConfig.B_Q: return Poker_B_Q;
            case PokerConfig.B_K: return Poker_B_K;

            // 大/小鬼
            case PokerConfig.J_B: return Poker_J_B;
            case PokerConfig.J_S: return Poker_J_S;
        }
        throw ' TextureConfig Error , type not has ' + type;
    }

    const hexDigits = "0123456789abcdef";
    export const createKey = (PokerLarge: string) => {
        let s = [];
        for (let i = 0; i < 36; i++) {
            s.push(hexDigits[Math.floor(Math.random() * 0x10)])
        }
        // bits 12-15 of the time_hi_and_version field to 0010
        s[14] = "4";
        // bits 6-7 of the clock_seq_hi_and_reserved to 01
        s[19] = hexDigits[(s[19].charCodeAt(0) & 0x3) | 0x8];
        s[8] = s[13] = s[18] = s[23] = "-";
        return PokerLarge.concat('-', ...s);
    }

    const defaultDegits = "0123456789qwertyuiopasdfghjklzxcvbnm";
    export const randomKey = (length: number) => {
        const s = [];
        for (let i = 0; i < length; i++) {
            s.push(defaultDegits[Math.floor(Math.random() * defaultDegits.length)])
        }
        return s.join('');
    }
}